import Vue from 'vue'
import Router from 'vue-router'
import store from "./store";

Vue.use(Router);

export default new Router({
    mode: 'hash',
    routes: [
        {
            path: '/',
            redirect: '/order/list'
        },
        {
            path: '/home',
            name: 'home',
            meta: {
                requireAuth: true,
            },
            component: () => import('./views/Index.vue')
        },
        {
            path: '/login',
            name: 'login',
            component: () => import('./views/Login.vue'),
            meta: {
                requireAuth: false,
            },
        },
        {
            path: '/order/list',       // 订单列表
            name: 'order',
            meta: {
                requireAuth: true
            },
            component: () => import('./views/DingDanManagerment/OrderList.vue')
        },{
            path: '/industry/list',       // 行业列表
            name: 'industryList',
            meta: {
                requireAuth: true
            },
            component: () => import('./views/DingDanManagerment/IndustryList.vue')
        },
        {
            path: '/customer/detail',       // 商户列表
            name: 'customerDetail',
            meta: {
                requireAuth: true
            },
            component: () => import('./views/DingDanManagerment/CustomerDetail.vue')
        },
        {
            path: '/financial/list',    // 财务明细
            name: 'financial',
            meta: {
                requireAuth: true,
            },
            component: () => import('./views/CaiWuManagerment/CustomerPay.vue')
        },
        {
            path: '/customer/list',    // 客户列表
            name: 'customer',
            meta: {
                requireAuth: true,
            },
            component: () => import('./views/YongHuManagerment/CustomerList.vue')
        },
        {
            path: '/record/info',    // 通话记录
            name: 'record',
            meta: {
                requireAuth: true,
            },
            component: () => import('./views/DingDanManagerment/RecordList.vue')
        },
        {
            path: '/customer/list/:id',    // 子账号列表
            name: 'customerChildren',
            meta: {
                requireAuth: true,
            },
            component: () => import('./views/YongHuManagerment/CustomerChildren.vue'),
        },
        {
            path: '/customer/control',    // 客户控制
            name: 'customerControl',
            meta: {
                requireAuth: true,
            },
            component: () => import('./views/YongHuManagerment/CustomerControl.vue')

        },
        {
            path: '/file/list',    // 文件列表
            name: 'file',
            meta: {
                requireAuth: true,
            },
            component: () => import('./views/WenJianManagerment/FileList.vue')
        },
        {
            path: '/authority/setting',    // 权限设置
            name: 'authoritySet',
            meta: {
                requireAuth: true,
            },
            component: () => import('./views/QuanXianManagerment/AuthoritySet.vue')
        },
        {
            path: '/authority/list',    // 权限设置
            name: 'authorityList',
            meta: {
                requireAuth: true,
            },
            component: () => import('./views/QuanXianManagerment/AuthorityList.vue')
        },
        {
            path: '/log/list',    // 日志管理
            name: 'log',
            meta: {
                requireAuth: true,
            },
            component: () => import('./views/RiZhiManagerment/LogList.vue')
        },
        {
            path: '/order/audit/pass',    // 订单审核通过列表
            name: 'OrderAuditPass',
            meta: {
                requireAuth: true,
            },
            component: () => import('./views/DingDanManagerment/OrderAuditPass.vue')
        },
        {
            path: '/tong/hua',    // 通话日志
            name: 'TongHua',
            meta: {
                requireAuth: true,
            },
            component: () => import('./views/RiZhiManagerment/TongHuaLog.vue')
        },
        {
            path: '/tong/count',    // 通话次数
            name: 'TongCount',
            meta: {
                requireAuth: true,
            },
            component: () => import('./views/YongHuManagerment/TongHuaMount.vue')
        },
        {
            path: '/mission/list',    // 创建任务
            name: 'missionList',
            meta: {
                requireAuth: true,
            },
            component: () => import('./views/MissionManagement/MissionList.vue')
        }
    ]
})
